package com.practice.xml.xstream;

import com.practice.xml.Employee;
import com.thoughtworks.xstream.XStream;

public final class XStreamPractice {
	public static void run() {
		XStream xstream = new XStream();
		xstream.alias("Employee", Employee.class);
		
		Employee employee = new Employee();
		employee.setName("Leo");
		
		String xml = xstream.toXML(employee);
		
		System.out.println(xml);
		
		employee = (Employee)xstream.fromXML(xml);
	}
}
